package com.innovation.chengzhangriji;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.innovation.chengzhangriji.BabyAndParent;
import com.innovation.chengzhangriji.Parent;
import com.innovation.chengzhangriji.Baby;
import com.innovation.chengzhangriji.Message;
import com.innovation.chengzhangriji.Timeline;
import com.innovation.chengzhangriji.TimelineServerTime;
import com.innovation.chengzhangriji.TimelineLastServerTime;
import com.innovation.chengzhangriji.TimelineText;
import com.innovation.chengzhangriji.TimelinePhoto;
import com.innovation.chengzhangriji.TimelinePhotoUrl;
import com.innovation.chengzhangriji.TimelineAudioUrl;
import com.innovation.chengzhangriji.TimelineVideoScreenshotUrl;
import com.innovation.chengzhangriji.TimelineVideoUrl;
import com.innovation.chengzhangriji.TimelineMilestone;
import com.innovation.chengzhangriji.TimelineDelete;
import com.innovation.chengzhangriji.PublicPhotoTheme;
import com.innovation.chengzhangriji.PublicMilestone;
import com.innovation.chengzhangriji.DiscoverSyncTime;
import com.innovation.chengzhangriji.DiscoverSaveComment;
import com.innovation.chengzhangriji.Discover;
import com.innovation.chengzhangriji.DiscoverPhoto;

import com.innovation.chengzhangriji.BabyAndParentDao;
import com.innovation.chengzhangriji.ParentDao;
import com.innovation.chengzhangriji.BabyDao;
import com.innovation.chengzhangriji.MessageDao;
import com.innovation.chengzhangriji.TimelineDao;
import com.innovation.chengzhangriji.TimelineServerTimeDao;
import com.innovation.chengzhangriji.TimelineLastServerTimeDao;
import com.innovation.chengzhangriji.TimelineTextDao;
import com.innovation.chengzhangriji.TimelinePhotoDao;
import com.innovation.chengzhangriji.TimelinePhotoUrlDao;
import com.innovation.chengzhangriji.TimelineAudioUrlDao;
import com.innovation.chengzhangriji.TimelineVideoScreenshotUrlDao;
import com.innovation.chengzhangriji.TimelineVideoUrlDao;
import com.innovation.chengzhangriji.TimelineMilestoneDao;
import com.innovation.chengzhangriji.TimelineDeleteDao;
import com.innovation.chengzhangriji.PublicPhotoThemeDao;
import com.innovation.chengzhangriji.PublicMilestoneDao;
import com.innovation.chengzhangriji.DiscoverSyncTimeDao;
import com.innovation.chengzhangriji.DiscoverSaveCommentDao;
import com.innovation.chengzhangriji.DiscoverDao;
import com.innovation.chengzhangriji.DiscoverPhotoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig babyAndParentDaoConfig;
    private final DaoConfig parentDaoConfig;
    private final DaoConfig babyDaoConfig;
    private final DaoConfig messageDaoConfig;
    private final DaoConfig timelineDaoConfig;
    private final DaoConfig timelineServerTimeDaoConfig;
    private final DaoConfig timelineLastServerTimeDaoConfig;
    private final DaoConfig timelineTextDaoConfig;
    private final DaoConfig timelinePhotoDaoConfig;
    private final DaoConfig timelinePhotoUrlDaoConfig;
    private final DaoConfig timelineAudioUrlDaoConfig;
    private final DaoConfig timelineVideoScreenshotUrlDaoConfig;
    private final DaoConfig timelineVideoUrlDaoConfig;
    private final DaoConfig timelineMilestoneDaoConfig;
    private final DaoConfig timelineDeleteDaoConfig;
    private final DaoConfig publicPhotoThemeDaoConfig;
    private final DaoConfig publicMilestoneDaoConfig;
    private final DaoConfig discoverSyncTimeDaoConfig;
    private final DaoConfig discoverSaveCommentDaoConfig;
    private final DaoConfig discoverDaoConfig;
    private final DaoConfig discoverPhotoDaoConfig;

    private final BabyAndParentDao babyAndParentDao;
    private final ParentDao parentDao;
    private final BabyDao babyDao;
    private final MessageDao messageDao;
    private final TimelineDao timelineDao;
    private final TimelineServerTimeDao timelineServerTimeDao;
    private final TimelineLastServerTimeDao timelineLastServerTimeDao;
    private final TimelineTextDao timelineTextDao;
    private final TimelinePhotoDao timelinePhotoDao;
    private final TimelinePhotoUrlDao timelinePhotoUrlDao;
    private final TimelineAudioUrlDao timelineAudioUrlDao;
    private final TimelineVideoScreenshotUrlDao timelineVideoScreenshotUrlDao;
    private final TimelineVideoUrlDao timelineVideoUrlDao;
    private final TimelineMilestoneDao timelineMilestoneDao;
    private final TimelineDeleteDao timelineDeleteDao;
    private final PublicPhotoThemeDao publicPhotoThemeDao;
    private final PublicMilestoneDao publicMilestoneDao;
    private final DiscoverSyncTimeDao discoverSyncTimeDao;
    private final DiscoverSaveCommentDao discoverSaveCommentDao;
    private final DiscoverDao discoverDao;
    private final DiscoverPhotoDao discoverPhotoDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        babyAndParentDaoConfig = daoConfigMap.get(BabyAndParentDao.class).clone();
        babyAndParentDaoConfig.initIdentityScope(type);

        parentDaoConfig = daoConfigMap.get(ParentDao.class).clone();
        parentDaoConfig.initIdentityScope(type);

        babyDaoConfig = daoConfigMap.get(BabyDao.class).clone();
        babyDaoConfig.initIdentityScope(type);

        messageDaoConfig = daoConfigMap.get(MessageDao.class).clone();
        messageDaoConfig.initIdentityScope(type);

        timelineDaoConfig = daoConfigMap.get(TimelineDao.class).clone();
        timelineDaoConfig.initIdentityScope(type);

        timelineServerTimeDaoConfig = daoConfigMap.get(TimelineServerTimeDao.class).clone();
        timelineServerTimeDaoConfig.initIdentityScope(type);

        timelineLastServerTimeDaoConfig = daoConfigMap.get(TimelineLastServerTimeDao.class).clone();
        timelineLastServerTimeDaoConfig.initIdentityScope(type);

        timelineTextDaoConfig = daoConfigMap.get(TimelineTextDao.class).clone();
        timelineTextDaoConfig.initIdentityScope(type);

        timelinePhotoDaoConfig = daoConfigMap.get(TimelinePhotoDao.class).clone();
        timelinePhotoDaoConfig.initIdentityScope(type);

        timelinePhotoUrlDaoConfig = daoConfigMap.get(TimelinePhotoUrlDao.class).clone();
        timelinePhotoUrlDaoConfig.initIdentityScope(type);

        timelineAudioUrlDaoConfig = daoConfigMap.get(TimelineAudioUrlDao.class).clone();
        timelineAudioUrlDaoConfig.initIdentityScope(type);

        timelineVideoScreenshotUrlDaoConfig = daoConfigMap.get(TimelineVideoScreenshotUrlDao.class).clone();
        timelineVideoScreenshotUrlDaoConfig.initIdentityScope(type);

        timelineVideoUrlDaoConfig = daoConfigMap.get(TimelineVideoUrlDao.class).clone();
        timelineVideoUrlDaoConfig.initIdentityScope(type);

        timelineMilestoneDaoConfig = daoConfigMap.get(TimelineMilestoneDao.class).clone();
        timelineMilestoneDaoConfig.initIdentityScope(type);

        timelineDeleteDaoConfig = daoConfigMap.get(TimelineDeleteDao.class).clone();
        timelineDeleteDaoConfig.initIdentityScope(type);

        publicPhotoThemeDaoConfig = daoConfigMap.get(PublicPhotoThemeDao.class).clone();
        publicPhotoThemeDaoConfig.initIdentityScope(type);

        publicMilestoneDaoConfig = daoConfigMap.get(PublicMilestoneDao.class).clone();
        publicMilestoneDaoConfig.initIdentityScope(type);

        discoverSyncTimeDaoConfig = daoConfigMap.get(DiscoverSyncTimeDao.class).clone();
        discoverSyncTimeDaoConfig.initIdentityScope(type);

        discoverSaveCommentDaoConfig = daoConfigMap.get(DiscoverSaveCommentDao.class).clone();
        discoverSaveCommentDaoConfig.initIdentityScope(type);

        discoverDaoConfig = daoConfigMap.get(DiscoverDao.class).clone();
        discoverDaoConfig.initIdentityScope(type);

        discoverPhotoDaoConfig = daoConfigMap.get(DiscoverPhotoDao.class).clone();
        discoverPhotoDaoConfig.initIdentityScope(type);

        babyAndParentDao = new BabyAndParentDao(babyAndParentDaoConfig, this);
        parentDao = new ParentDao(parentDaoConfig, this);
        babyDao = new BabyDao(babyDaoConfig, this);
        messageDao = new MessageDao(messageDaoConfig, this);
        timelineDao = new TimelineDao(timelineDaoConfig, this);
        timelineServerTimeDao = new TimelineServerTimeDao(timelineServerTimeDaoConfig, this);
        timelineLastServerTimeDao = new TimelineLastServerTimeDao(timelineLastServerTimeDaoConfig, this);
        timelineTextDao = new TimelineTextDao(timelineTextDaoConfig, this);
        timelinePhotoDao = new TimelinePhotoDao(timelinePhotoDaoConfig, this);
        timelinePhotoUrlDao = new TimelinePhotoUrlDao(timelinePhotoUrlDaoConfig, this);
        timelineAudioUrlDao = new TimelineAudioUrlDao(timelineAudioUrlDaoConfig, this);
        timelineVideoScreenshotUrlDao = new TimelineVideoScreenshotUrlDao(timelineVideoScreenshotUrlDaoConfig, this);
        timelineVideoUrlDao = new TimelineVideoUrlDao(timelineVideoUrlDaoConfig, this);
        timelineMilestoneDao = new TimelineMilestoneDao(timelineMilestoneDaoConfig, this);
        timelineDeleteDao = new TimelineDeleteDao(timelineDeleteDaoConfig, this);
        publicPhotoThemeDao = new PublicPhotoThemeDao(publicPhotoThemeDaoConfig, this);
        publicMilestoneDao = new PublicMilestoneDao(publicMilestoneDaoConfig, this);
        discoverSyncTimeDao = new DiscoverSyncTimeDao(discoverSyncTimeDaoConfig, this);
        discoverSaveCommentDao = new DiscoverSaveCommentDao(discoverSaveCommentDaoConfig, this);
        discoverDao = new DiscoverDao(discoverDaoConfig, this);
        discoverPhotoDao = new DiscoverPhotoDao(discoverPhotoDaoConfig, this);

        registerDao(BabyAndParent.class, babyAndParentDao);
        registerDao(Parent.class, parentDao);
        registerDao(Baby.class, babyDao);
        registerDao(Message.class, messageDao);
        registerDao(Timeline.class, timelineDao);
        registerDao(TimelineServerTime.class, timelineServerTimeDao);
        registerDao(TimelineLastServerTime.class, timelineLastServerTimeDao);
        registerDao(TimelineText.class, timelineTextDao);
        registerDao(TimelinePhoto.class, timelinePhotoDao);
        registerDao(TimelinePhotoUrl.class, timelinePhotoUrlDao);
        registerDao(TimelineAudioUrl.class, timelineAudioUrlDao);
        registerDao(TimelineVideoScreenshotUrl.class, timelineVideoScreenshotUrlDao);
        registerDao(TimelineVideoUrl.class, timelineVideoUrlDao);
        registerDao(TimelineMilestone.class, timelineMilestoneDao);
        registerDao(TimelineDelete.class, timelineDeleteDao);
        registerDao(PublicPhotoTheme.class, publicPhotoThemeDao);
        registerDao(PublicMilestone.class, publicMilestoneDao);
        registerDao(DiscoverSyncTime.class, discoverSyncTimeDao);
        registerDao(DiscoverSaveComment.class, discoverSaveCommentDao);
        registerDao(Discover.class, discoverDao);
        registerDao(DiscoverPhoto.class, discoverPhotoDao);
    }
    
    public void clear() {
        babyAndParentDaoConfig.getIdentityScope().clear();
        parentDaoConfig.getIdentityScope().clear();
        babyDaoConfig.getIdentityScope().clear();
        messageDaoConfig.getIdentityScope().clear();
        timelineDaoConfig.getIdentityScope().clear();
        timelineServerTimeDaoConfig.getIdentityScope().clear();
        timelineLastServerTimeDaoConfig.getIdentityScope().clear();
        timelineTextDaoConfig.getIdentityScope().clear();
        timelinePhotoDaoConfig.getIdentityScope().clear();
        timelinePhotoUrlDaoConfig.getIdentityScope().clear();
        timelineAudioUrlDaoConfig.getIdentityScope().clear();
        timelineVideoScreenshotUrlDaoConfig.getIdentityScope().clear();
        timelineVideoUrlDaoConfig.getIdentityScope().clear();
        timelineMilestoneDaoConfig.getIdentityScope().clear();
        timelineDeleteDaoConfig.getIdentityScope().clear();
        publicPhotoThemeDaoConfig.getIdentityScope().clear();
        publicMilestoneDaoConfig.getIdentityScope().clear();
        discoverSyncTimeDaoConfig.getIdentityScope().clear();
        discoverSaveCommentDaoConfig.getIdentityScope().clear();
        discoverDaoConfig.getIdentityScope().clear();
        discoverPhotoDaoConfig.getIdentityScope().clear();
    }

    public BabyAndParentDao getBabyAndParentDao() {
        return babyAndParentDao;
    }

    public ParentDao getParentDao() {
        return parentDao;
    }

    public BabyDao getBabyDao() {
        return babyDao;
    }

    public MessageDao getMessageDao() {
        return messageDao;
    }

    public TimelineDao getTimelineDao() {
        return timelineDao;
    }

    public TimelineServerTimeDao getTimelineServerTimeDao() {
        return timelineServerTimeDao;
    }

    public TimelineLastServerTimeDao getTimelineLastServerTimeDao() {
        return timelineLastServerTimeDao;
    }

    public TimelineTextDao getTimelineTextDao() {
        return timelineTextDao;
    }

    public TimelinePhotoDao getTimelinePhotoDao() {
        return timelinePhotoDao;
    }

    public TimelinePhotoUrlDao getTimelinePhotoUrlDao() {
        return timelinePhotoUrlDao;
    }

    public TimelineAudioUrlDao getTimelineAudioUrlDao() {
        return timelineAudioUrlDao;
    }

    public TimelineVideoScreenshotUrlDao getTimelineVideoScreenshotUrlDao() {
        return timelineVideoScreenshotUrlDao;
    }

    public TimelineVideoUrlDao getTimelineVideoUrlDao() {
        return timelineVideoUrlDao;
    }

    public TimelineMilestoneDao getTimelineMilestoneDao() {
        return timelineMilestoneDao;
    }

    public TimelineDeleteDao getTimelineDeleteDao() {
        return timelineDeleteDao;
    }

    public PublicPhotoThemeDao getPublicPhotoThemeDao() {
        return publicPhotoThemeDao;
    }

    public PublicMilestoneDao getPublicMilestoneDao() {
        return publicMilestoneDao;
    }

    public DiscoverSyncTimeDao getDiscoverSyncTimeDao() {
        return discoverSyncTimeDao;
    }

    public DiscoverSaveCommentDao getDiscoverSaveCommentDao() {
        return discoverSaveCommentDao;
    }

    public DiscoverDao getDiscoverDao() {
        return discoverDao;
    }

    public DiscoverPhotoDao getDiscoverPhotoDao() {
        return discoverPhotoDao;
    }

}
